home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 2 / LSD and 17bit Compendium Deluxe - Volume II.iso / a / prog / cprog / c_tutor.lha / C_Tutor / BREAKCON.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-02-11  |  286 b   |  16 lines

  1. main()
  2. {
  3. int xx;
  4.  
  5.    for(xx = 5;xx < 15;xx = xx + 1){
  6.       if (xx == 8)
  7.          break;
  8.       printf("In the break loop, xx is now %d\n",xx);
  9.    }
  10.  
  11.    for(xx = 5;xx < 15;xx = xx + 1){
  12.       if (xx == 8)
  13.          continue;
  14.       printf("In the continue loop, xx is now %d\n",xx);
  15.    }
  16. }